﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using OilRigSumoWrestlers.Controllables;
using OilRigSumoWrestlers.Scenes.Menu;
using RaptorEngine;
using RaptorEngine.Components.Drawable;

namespace OilRigSumoWrestlers.Scenes
{
    internal class CountdownScene : MenuScene
    {
        public CountdownScene() : base(false)
        {
            Entity timer = new Entity();
            timer.Position =
                new Vector3(
                    GameEngine.Instance.Render.GraphicsDevice.Viewport.TitleSafeArea.X +
                    GameEngine.Instance.Render.GraphicsDevice.Viewport.TitleSafeArea.Width/2,
                    GameEngine.Instance.Render.GraphicsDevice.Viewport.TitleSafeArea.Y +
                    GameEngine.Instance.Render.GraphicsDevice.Viewport.TitleSafeArea.Height/2, 0);

            DrawableText timerText = new DrawableText(timer, GameEngine.Instance.Load<SpriteFont>("Fonts/MenuFont"), "");
            timerText.CenterText();

            timer.AddComponent(timerText);

            CountdownTimer ct = new CountdownTimer(timer, timerText, 3);
            timer.AddComponent(ct);
            

            AddEntity(timer);
        }

        public override void Update()
        {
        }
    }
}
